<html>
<head><meta charset="utf-8"><title>no backtrace · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/no.20backtrace.html">no backtrace</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="159256210"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/no%20backtrace/near/159256210" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> blitzerr <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/no.20backtrace.html#159256210">(Feb 24 2019 at 02:38)</a>:</h4>
<p>In what cases do we not get the backtrace even after running with the variable set <code>RUST_BACKTRACE=1</code> ?</p>



<a name="159256223"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/no%20backtrace/near/159256223" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> blitzerr <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/no.20backtrace.html#159256223">(Feb 24 2019 at 02:39)</a>:</h4>
<p>I am compiling it with <br>
<code>rustc +nightly &lt;my program&gt;</code><br>
and I get the output as <br>
<code>thread 'main' panicked at 'attempt to subtract with overflow', /rustc/aadbc459bd97a0325897e2ff94999efbec6a499c/src/libcore/ops/arith.rs:198:45
note: Run with </code>RUST_BACKTRACE=1<code> environment variable to display a backtrace.</code></p>



<a name="159330429"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/no%20backtrace/near/159330429" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/no.20backtrace.html#159330429">(Feb 25 2019 at 11:33)</a>:</h4>
<p>what platform is this? Linux?</p>



<a name="159638591"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/no%20backtrace/near/159638591" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> blitzerr <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/no.20backtrace.html#159638591">(Feb 28 2019 at 18:28)</a>:</h4>
<p><span class="user-mention" data-user-id="116083">@pnkfelix</span>  MacOs. I manged to get back stack trace but I don't get the line numbers.</p>



<a name="159638958"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/no%20backtrace/near/159638958" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> blitzerr <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/no.20backtrace.html#159638958">(Feb 28 2019 at 18:32)</a>:</h4>
<p>I found this <a href="https://github.com/rust-lang/rust/issues/46346" target="_blank" title="https://github.com/rust-lang/rust/issues/46346">#46346</a> but this was closed.</p>



<a name="159681915"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/no%20backtrace/near/159681915" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/no.20backtrace.html#159681915">(Mar 01 2019 at 06:14)</a>:</h4>
<p>A backtrace can be useful even without line numbers. You should be able to get a backtrace with line numbers by building the compiler yourself (or maybe by using <a href="https://crates.io/crates/rustup-toolchain-install-master" target="_blank" title="https://crates.io/crates/rustup-toolchain-install-master">https://crates.io/crates/rustup-toolchain-install-master</a>)</p>



<a name="160296980"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/no%20backtrace/near/160296980" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> blitzerr <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/no.20backtrace.html#160296980">(Mar 08 2019 at 15:07)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span>  I have <code>debuginfo-lines = true</code> in the config.toml</p>



<a name="160300667"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/no%20backtrace/near/160300667" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/no.20backtrace.html#160300667">(Mar 08 2019 at 15:53)</a>:</h4>
<p>and you're still not getting line numbers? Can you still post the backtrace? Even without line numbers we might be able to figure out where the issue comes from</p>



<a name="160483195"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/no%20backtrace/near/160483195" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/no.20backtrace.html#160483195">(Mar 11 2019 at 14:30)</a>:</h4>
<p><span class="user-mention" data-user-id="128294">@blitzerr</span> I don't understand, you said you're running <code>rustc +nightly ...</code> ; that is not running <em>your</em> local build then, right?</p>



<a name="160497206"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/no%20backtrace/near/160497206" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> blitzerr <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/no.20backtrace.html#160497206">(Mar 11 2019 at 17:03)</a>:</h4>
<p><span class="user-mention" data-user-id="116083">@pnkfelix</span>  That is true. With nightly or with stage 1 compiler, I don't get line numbers with stack trace.</p>



<a name="160497389"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/no%20backtrace/near/160497389" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/no.20backtrace.html#160497389">(Mar 11 2019 at 17:04)</a>:</h4>
<p>For nightly I think that’s expected, since nightly is built without debuginfo</p>



<a name="167046889"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/no%20backtrace/near/167046889" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Esteban Küber <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/no.20backtrace.html#167046889">(Jun 01 2019 at 00:58)</a>:</h4>
<p>I'm having a very similar problem: I get backtraces, but every level of the stack is identified only with <code>unknown</code> and nothing else. I've tried with every knob in <code>config.toml</code> that could possibly be related. Last few nightlies also have the same behavior. Platform is also macos.</p>



<a name="167047083"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/no%20backtrace/near/167047083" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Esteban Küber <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/no.20backtrace.html#167047083">(Jun 01 2019 at 01:03)</a>:</h4>
<p>An example of the output:</p>
<div class="codehilite"><pre><span></span>$ RUST_BACKTRACE=full rustc +devel file.rs -Ztreat-err-as-bug
error: couldn&#39;t read file.rs: No such file or directory (os error 2)

thread &#39;rustc&#39; panicked at &#39;aborting due to `-Z treat-err-as-bug=1`&#39;, src/librustc_errors/lib.rs:534:13
stack backtrace:
   0:        0x10cd72c84 - &lt;unknown&gt;
   1:        0x10cd70036 - &lt;unknown&gt;
   2:        0x10cd6fdba - &lt;unknown&gt;
   3:        0x10a982322 - &lt;unknown&gt;
   4:        0x10cd70731 - &lt;unknown&gt;
   5:        0x10c9d43b4 - &lt;unknown&gt;
   6:        0x10c9ef9b6 - &lt;unknown&gt;
   7:        0x10c9fefdc - &lt;unknown&gt;
   8:        0x10c17959f - &lt;unknown&gt;
   9:        0x10c177e9e - &lt;unknown&gt;
  10:        0x106c0f742 - &lt;unknown&gt;
  11:        0x106c0edfa - &lt;unknown&gt;
  12:        0x106b573b9 - &lt;unknown&gt;
  13:        0x106bb6280 - &lt;unknown&gt;
  14:        0x106c390bb - &lt;unknown&gt;
  15:        0x10691fe4b - &lt;unknown&gt;
  16:        0x10699e086 - &lt;unknown&gt;
  17:        0x10698d175 - &lt;unknown&gt;
  18:        0x10699b484 - &lt;unknown&gt;
  19:        0x106942e69 - &lt;unknown&gt;
  20:        0x10cd91cce - &lt;unknown&gt;
  21:        0x10698c408 - &lt;unknown&gt;
  22:        0x1068fb16b - &lt;unknown&gt;
  23:        0x10cd5858d - &lt;unknown&gt;
  24:        0x10cd9134d - &lt;unknown&gt;
  25:        0x10cd86bc8 - &lt;unknown&gt;
  26:     0x7fff784492ea - &lt;unknown&gt;
  27:     0x7fff7844c248 - &lt;unknown&gt;
query stack during panic:
end of query stack
</pre></div>



<a name="167060518"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/no%20backtrace/near/167060518" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/no.20backtrace.html#167060518">(Jun 01 2019 at 07:36)</a>:</h4>
<p><span class="user-mention" data-user-id="121053">@varkor</span> reported similar in Discord and linked to <a href="https://github.com/rust-lang/rust/issues/60852" target="_blank" title="https://github.com/rust-lang/rust/issues/60852">#60852</a>, <span class="user-mention" data-user-id="119031">@Esteban Küber</span></p>



<a name="167065415"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/no%20backtrace/near/167065415" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> varkor <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/no.20backtrace.html#167065415">(Jun 01 2019 at 09:55)</a>:</h4>
<p>that was after I saw <span class="user-mention" data-user-id="119031">@Esteban Küber</span>'s issue :P</p>



<a name="167065460"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/no%20backtrace/near/167065460" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/no.20backtrace.html#167065460">(Jun 01 2019 at 09:56)</a>:</h4>
<p>Ah, I just saw both messages this morning and though they could be related.</p>



<a name="167067728"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/no%20backtrace/near/167067728" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/no.20backtrace.html#167067728">(Jun 01 2019 at 11:05)</a>:</h4>
<p>The stack frame addresses look sane, so the unwinder probably just fails to figure out what lines/functions/files/etc the instruction pointers come from)</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>